﻿<navigation:Page x:Class="Candy.InstallPage" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Install" 
            DataContext="{Binding Source={StaticResource Locator}, Path=Install}"      
                 >
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*"/>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="0.5*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" MinHeight="30"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Button x:Name="InstBttn" Margin="0,20,150,0" Content="Install" Grid.Column="1"  VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Row="4" Command="{Binding Path=Install}" />
        <StackPanel Grid.Column="1" Margin="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1">
            <TextBlock HorizontalAlignment="Center" Margin="0" TextWrapping="Wrap" Text="Cand" VerticalAlignment="Center" FontSize="85.333" FontWeight="Bold" FontFamily="Segoe UI Semibold"/>
            <Image Margin="2,43,0,0" VerticalAlignment="Center" Source="Images/Candy64.png" Stretch="None" HorizontalAlignment="Center"/>
        </StackPanel>
        <TextBlock x:Name="Msg" Margin="0" Grid.Row="2" TextWrapping="Wrap" Width="305" VerticalAlignment="Center" HorizontalAlignment="Center"  Grid.Column="1" Visibility="{Binding IsInstalled, ConverterParameter=negate, Converter={StaticResource VisibilityConverter}, Mode=OneWay}" >
        	<Run Text="Candy is designed to run out of the browser. You can install Candy onto your computer and start directly from"/>
        	<Run Text=" start menu/ "/>
        	<Run Text=" app folder"/>
        	<Run Text="."/>
        </TextBlock>
        <Button HorizontalAlignment="Right" Margin="0,20,20,0" VerticalAlignment="Top" Content="Stay in browser" Grid.Column="1" Grid.Row="4" Command="{Binding Path=StayInbrowser}" />
        <TextBlock x:Name="Msg_Copy" Margin="0" Grid.Row="3" TextWrapping="Wrap" Width="305" VerticalAlignment="Center" HorizontalAlignment="Center"  Grid.Column="1" Visibility="{Binding IsInstalled, Converter={StaticResource VisibilityConverter}, Mode=OneWay}" >
        	<Run Text="Candy is "/>
        	<Run Text="already installed on your computer."/>
        	<Run Text=" You can "/>
        	<Run Text="start Candy from your start menu/ app folder"/>
        	<Run Text="."/>
        </TextBlock>
    </Grid>
</navigation:Page>
